package com.kjlink.demo.sofa.provider;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * 描述:
 *
 * @author Vic.xu
 * @since 2025-10-23 16:57
 */
@SpringBootApplication
@RestController
public class ProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProviderApplication.class, args);
    }



    @Value("${server.port}")
    private String port;

    @Value("${spring.application.name}")
    private String name;

    @GetMapping(value = {"", "/"})
    public Map<String, Object> index() {
        Map<String, Object> map = new HashMap<>();
        map.put("name", name);
        map.put("port", port);
        map.put("time", LocalTime.now());
        return map;
    }

}
